using MicroMsg.Common.Event;
using MicroMsg.Common.Utils;
using MicroMsg.Resource.@string;
using MicroMsg.Storage;
using MicroMsg.UI.Util;
using Microsoft.Phone.Controls;
using Microsoft.Phone.Shell;
using Microsoft.Xna.Framework.Media;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.IO;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
namespace MicroMsg.UI.UserContrl
{
	public class ScrollPicListCtrl : UserControl
	{
		public delegate void ListItemClick(object sender, object object_0);
		private const string TAG = "ScrollPicListCtrl";
		private const int cNMaxPicCnt = 9;
		private const uint cNExpandDur = 250u;
		private const uint cNAniObjMarginL = 12u;
		private const uint cNShrinkDur = 250u;
		private const double screenW = 480.0;
		private const double screenH = 800.0;
		private List<ScrollPicItem> mListImgItems;
		private Ellipse[] mArrEllipse;
		private PanoramaItem mItem1;
		private PanoramaItem mItem2;
		private static ScrollPicListCtrl sInstance;
		private bool mBIsFirstLoaded = true;
		private EventWatcher mWatchxxx;
		private object mObjectWatcher;
		private int mNCurImageIndex;
		private int mNCurPaIndex;
		private bool mBIsClick = true;
		private DateTime mTimeStartM;
		private Dictionary<UIElement, Visibility> mDictParentVisibility = new Dictionary<UIElement, Visibility>();
		private bool mBIsStarted;
		private bool mBIsHown;
		private int mNVisibleCnt;
		private int mNPreShowDotIndex;
		private bool mBIsExpandImgAniStarted;
		private Storyboard mSbExpandImg;
		private bool mBIsFirstIn = true;
		private bool mBIsDownLoadImgAniStarted;
		private bool mBIsShrinkImgAniStarted;
		private Storyboard mSbShrinkImg;
		private ScrollPicsCtrlArgs mScrollPicsCtrlArgs;
		private IApplicationBar mPreBar;
		private ApplicationBar mBar;
		private bool isEnableDrag = true;
		private double initialAngle;
		private double initialScale;
		private double initialX;
		private double initialY;
		private double maxRadio = 5.0;
		internal Grid gridLayoutRoot;
		internal Grid panoramaLayout;
		internal Panorama panoramaCtrl;
		internal PanoramaItem pItem1;
		internal ScrollPicItem img1;
		internal PanoramaItem pItem2;
		internal ScrollPicItem img2;
		internal PanoramaItem pItem3;
		internal ScrollPicItem img3;
		internal StackPanel panelDots;
		internal Ellipse dot0;
		internal Ellipse dot1;
		internal Ellipse dot2;
		internal Ellipse dot3;
		internal Ellipse dot4;
		internal Ellipse dot5;
		internal Ellipse dot6;
		internal Ellipse dot7;
		internal Ellipse dot8;
		internal Canvas canvasAniArea;
		internal Image imgAni;
		internal Border ImgView;
		internal Image ShowImg;
		internal CompositeTransform transform;
		internal GestureListener borderListener;
		private bool _contentLoaded;
		public event ScrollPicListCtrl.ListItemClick ItemClick;
		private ScrollPicListCtrl()
		{
			ShowObjectInMemory.AddOneObjectRecord(this);
			this.InitializeComponent();
			this.panoramaCtrl.set_Visibility(0);
			this.panoramaCtrl.DefaultItem = this.panoramaCtrl.get_Items().get_Item(0);
			this.mItem1 = (this.panoramaCtrl.get_Items().get_Item(1) as PanoramaItem);
			this.mItem2 = (this.panoramaCtrl.get_Items().get_Item(2) as PanoramaItem);
			this.panoramaCtrl.get_Items().Remove(this.mItem1);
			this.panoramaCtrl.get_Items().Remove(this.mItem2);
			base.add_Loaded(new RoutedEventHandler(this.Control_Loaded));
			base.add_Unloaded(new RoutedEventHandler(this.Control_Unloaded));
			List<ScrollPicItem> list = new List<ScrollPicItem>();
			list.Add(this.img1);
			list.Add(this.img2);
			list.Add(this.img3);
			this.mListImgItems = list;
			this.mArrEllipse = new Ellipse[]
			{
				this.dot0,
				this.dot1,
				this.dot2,
				this.dot3,
				this.dot4,
				this.dot5,
				this.dot6,
				this.dot7,
				this.dot8
			};
		}
		~ScrollPicListCtrl()
		{
			ShowObjectInMemory.RemoveOneObjectRecord(this);
		}
		public static ScrollPicListCtrl getInstance()
		{
			if (ScrollPicListCtrl.sInstance != null)
			{
				return ScrollPicListCtrl.sInstance;
			}
			ScrollPicListCtrl.sInstance = new ScrollPicListCtrl();
			return ScrollPicListCtrl.sInstance;
		}
		private void Control_Loaded(object sender, RoutedEventArgs e)
		{
			if (!this.mBIsFirstLoaded)
			{
				return;
			}
			this.Show();
			this.mBIsFirstLoaded = false;
			Log.smethod_5("ScrollPicListCtrl", "Control_Loaded");
		}
		private void Control_Unloaded(object sender, RoutedEventArgs e)
		{
			Log.smethod_5("ScrollPicListCtrl", "Control_Unloaded");
		}
		private void registerEvent()
		{
			if (this.mWatchxxx == null)
			{
				this.mWatchxxx = new EventWatcher(this, null, new EventHandlerDelegate(this.Onxxx));
				EventCenter.registerEventWatcher(EventConst.ON_STORAGE_CONTACT_ADD, this.mWatchxxx);
			}
		}
		private void unRegisterEvent()
		{
			if (this.mWatchxxx != null)
			{
				EventCenter.removeEventWatcher(EventConst.ON_STORAGE_CONTACT_ADD, this.mWatchxxx);
				this.mWatchxxx = null;
			}
		}
		private void Onxxx(EventWatcher watcher, BaseEventArgs evtArgs)
		{
			if (evtArgs == null)
			{
				return;
			}
		}
		private void btnLayoutRoot_Click(object sender, RoutedEventArgs e)
		{
		}
		private int getScrollOffset(int nNewPIndex, int nOldPindex)
		{
			if (nNewPIndex == nOldPindex)
			{
				return 0;
			}
			int num = nNewPIndex - nOldPindex;
			if (num != -1)
			{
				if (num != 1)
				{
					if (num != -2)
					{
						if (num != 2)
						{
							return 0;
						}
					}
					return num / -2;
				}
			}
			return num;
		}
		private void panoramaCtrl_SelectionChanged(object sender, SelectionChangedEventArgs e)
		{
			int selectedIndex = this.panoramaCtrl.SelectedIndex;
			if (selectedIndex == this.mNCurPaIndex)
			{
				return;
			}
			if (!ScrollPicsCtrlArgs.CheckIsInfoOk(this.mScrollPicsCtrlArgs))
			{
				return;
			}
			int num = this.mNCurImageIndex + this.getScrollOffset(selectedIndex, this.mNCurPaIndex);
			if (num >= 0 && num < this.mScrollPicsCtrlArgs.mListSnsImg.get_Count())
			{
				this.mNCurImageIndex = num;
				base.get_Dispatcher().BeginInvoke(delegate
				{
					this.setImgToPaCtrl();
				});
				this.mNCurPaIndex = selectedIndex;
				return;
			}
			base.get_Dispatcher().BeginInvoke(delegate
			{
				this.panoramaCtrl.DefaultItem = this.panoramaCtrl.get_Items().get_Item(this.mNCurPaIndex);
			});
		}
		private void panoramaCtrl_ManipulationStarted(object sender, ManipulationStartedEventArgs e)
		{
			double totalMilliseconds = DateTime.get_Now().Subtract(this.mTimeStartM).get_TotalMilliseconds();
			if (totalMilliseconds < 250.0)
			{
				this.mTimeStartM = DateTime.get_Now();
				this.mBIsClick = false;
				return;
			}
			this.mTimeStartM = DateTime.get_Now();
			this.mBIsClick = true;
		}
		private void panoramaCtrl_ManipulationDelta(object sender, ManipulationDeltaEventArgs e)
		{
			Point translation = e.get_DeltaManipulation().get_Translation();
			if (translation.get_X() * translation.get_X() + translation.get_Y() * translation.get_Y() > 25.0)
			{
				this.mBIsClick = false;
			}
			if (this.mNCurImageIndex == 0 && e.get_DeltaManipulation().get_Translation().get_X() > 0.0)
			{
				e.set_Handled(true);
				e.Complete();
			}
			if (this.mScrollPicsCtrlArgs != null && this.mScrollPicsCtrlArgs.mListSnsImg != null)
			{
				if (this.mNCurImageIndex == this.mScrollPicsCtrlArgs.mListSnsImg.get_Count() - 1 && e.get_DeltaManipulation().get_Translation().get_X() < 0.0)
				{
					e.set_Handled(true);
					this.mTimeStartM = DateTime.get_Now();
					e.Complete();
				}
				return;
			}
		}
		private void panoramaCtrl_ManipulationCompleted(object sender, ManipulationCompletedEventArgs e)
		{
			if (this.mBIsClick)
			{
				double arg_23_0 = DateTime.get_Now().Subtract(this.mTimeStartM).get_TotalMilliseconds();
			}
		}
		private void btnPItem_Click(object sender, RoutedEventArgs e)
		{
		}
		public void Start()
		{
			if (this.mBIsStarted)
			{
				return;
			}
			if (ScrollPicsCtrlArgs.CheckIsInfoOk(this.mScrollPicsCtrlArgs))
			{
				this.setAppBar();
				if (this.mScrollPicsCtrlArgs.mPanelHolder != null)
				{
					this.mDictParentVisibility.Clear();
					using (IEnumerator<UIElement> enumerator = this.mScrollPicsCtrlArgs.mPanelHolder.get_Children().GetEnumerator())
					{
						while (enumerator.MoveNext())
						{
							UIElement current = enumerator.get_Current();
							if (current != this && current != null)
							{
								this.mDictParentVisibility.set_Item(current, current.get_Visibility());
								current.set_Visibility(1);
							}
						}
					}
				}
				this.setVisibleDotCnt(this.mScrollPicsCtrlArgs.mListSnsImg.get_Count());
				this.showDotIndex(this.mScrollPicsCtrlArgs.mNFirstPicIndex);
				BasePage topPage = PageManager.getInstance().GetTopPage();
				topPage.add_BackKeyPress(new EventHandler<CancelEventArgs>(this.page_BackKeyPress));
				this.mBIsStarted = true;
			}
		}
		private void page_BackKeyPress(object sender, CancelEventArgs e)
		{
			if (!this.mBIsShrinkImgAniStarted && !this.mBIsExpandImgAniStarted)
			{
				e.set_Cancel(true);
				this.Hide();
				return;
			}
			e.set_Cancel(true);
		}
		public void Show()
		{
			this.mBIsHown = true;
			this.initUIByArgs();
		}
		private void setImgToPaCtrl()
		{
			if (this.mScrollPicsCtrlArgs == null)
			{
				return;
			}
			int selectedIndex = this.panoramaCtrl.SelectedIndex;
			int count = this.mScrollPicsCtrlArgs.mListSnsImg.get_Count();
			int num = (selectedIndex - 1 >= 0) ? (selectedIndex - 1) : 2;
			int num2 = (selectedIndex + 1 < 3) ? (selectedIndex + 1) : 0;
			this.showDotIndex(this.mNCurImageIndex);
			if (this.mNCurImageIndex - 1 >= 0)
			{
				this.mListImgItems.get_Item(num).set_Opacity(1.0);
				this.mListImgItems.get_Item(num).mImgThumb = this.mScrollPicsCtrlArgs.mListThumbImg.get_Item(this.mNCurImageIndex - 1);
				this.mListImgItems.get_Item(num).ObjMediaInfo = this.mScrollPicsCtrlArgs.mListSnsImg.get_Item(this.mNCurImageIndex - 1);
			}
			else
			{
				this.mListImgItems.get_Item(num).set_Opacity(0.001);
			}
			if (this.mNCurImageIndex + 1 < count)
			{
				this.mListImgItems.get_Item(num2).set_Opacity(1.0);
				this.mListImgItems.get_Item(num2).mImgThumb = this.mScrollPicsCtrlArgs.mListThumbImg.get_Item(this.mNCurImageIndex + 1);
				this.mListImgItems.get_Item(num2).ObjMediaInfo = this.mScrollPicsCtrlArgs.mListSnsImg.get_Item(this.mNCurImageIndex + 1);
				return;
			}
			this.mListImgItems.get_Item(num2).set_Opacity(0.001);
		}
		public void Hide()
		{
			if (this.ImgView.get_Visibility() == null)
			{
				this.ResumeStoryBoard();
				return;
			}
			if (!this.mBIsHown)
			{
				return;
			}
			this.mBIsHown = false;
			BasePage topPage = PageManager.getInstance().GetTopPage();
			topPage.remove_BackKeyPress(new EventHandler<CancelEventArgs>(this.page_BackKeyPress));
			this.setVisibleDotCnt(0);
			if (this.mScrollPicsCtrlArgs.mBIsNeedAnimation)
			{
				this.startShrinkImgAni();
				return;
			}
			this.stopShrinkImgAni();
		}
		private void initUIByArgs()
		{
			if (this.mScrollPicsCtrlArgs == null)
			{
				return;
			}
			if (!ScrollPicsCtrlArgs.CheckIsInfoOk(this.mScrollPicsCtrlArgs))
			{
				return;
			}
			this.mNCurImageIndex = this.mScrollPicsCtrlArgs.mNFirstPicIndex;
			if (!this.imagesOk())
			{
				this.startDownLoadImgAni();
				return;
			}
			if (this.mScrollPicsCtrlArgs.mBIsNeedAnimation)
			{
				base.get_Dispatcher().BeginInvoke(delegate
				{
					this.startExpandImgAni();
				});
				return;
			}
			this.stopExpandImgAni();
		}
		private bool imagesOk()
		{
			return true;
		}
		private void setVisibleDotCnt(int nCnt)
		{
			if (nCnt > 1 && nCnt <= 9)
			{
				int num = this.mNVisibleCnt;
				for (int i = 0; i < num; i++)
				{
					this.mArrEllipse[i].set_Visibility(1);
				}
				for (int j = 0; j < nCnt; j++)
				{
					this.mArrEllipse[j].set_Visibility(0);
				}
				this.panelDots.set_Visibility(0);
				this.mNVisibleCnt = nCnt;
				return;
			}
			this.panelDots.set_Visibility(1);
		}
		private void showDotIndex(int nIndex)
		{
			if (nIndex >= 0 && nIndex < this.mNVisibleCnt)
			{
				Shape arg_3D_0 = this.mArrEllipse[this.mNPreShowDotIndex];
				SolidColorBrush solidColorBrush = new SolidColorBrush();
				solidColorBrush.set_Color(Color.FromArgb(119, 255, 255, 255));
				arg_3D_0.set_Fill(solidColorBrush);
				Shape arg_70_0 = this.mArrEllipse[nIndex];
				SolidColorBrush solidColorBrush2 = new SolidColorBrush();
				solidColorBrush2.set_Color(Color.FromArgb(255, 255, 255, 255));
				arg_70_0.set_Fill(solidColorBrush2);
				this.mNPreShowDotIndex = nIndex;
				return;
			}
		}
		private void startExpandImgAni()
		{
			if (!ScrollPicsCtrlArgs.CheckIsInfoOk(this.mScrollPicsCtrlArgs))
			{
				return;
			}
			this.mSbExpandImg = new Storyboard();
			this.panoramaCtrl.set_IsEnabled(false);
			this.panoramaCtrl.set_IsHitTestVisible(false);
			base.get_Dispatcher().BeginInvoke(delegate
			{
				this.panoramaCtrl.set_IsEnabled(true);
				this.panoramaCtrl.set_IsHitTestVisible(true);
			});
			Rect imageFillModeRect = ToolFunction.GetImageFillModeRect(new Size(480.0, 800.0), new Size((double)this.mScrollPicsCtrlArgs.mListSnsImg.get_Item(this.mScrollPicsCtrlArgs.mNFirstPicIndex).nWidth, (double)this.mScrollPicsCtrlArgs.mListSnsImg.get_Item(this.mScrollPicsCtrlArgs.mNFirstPicIndex).nHeight));
			DoubleAnimation doubleAnimation = ToolFunction.createAnimation(default(double?), imageFillModeRect.get_Width(), this.imgAni, "Width", 250u);
			this.mSbExpandImg.get_Children().Add(doubleAnimation);
			doubleAnimation = ToolFunction.createAnimation(default(double?), imageFillModeRect.get_Height(), this.imgAni, "Height", 250u);
			this.mSbExpandImg.get_Children().Add(doubleAnimation);
			doubleAnimation = ToolFunction.createAnimation(default(double?), imageFillModeRect.get_X(), this.imgAni, "(Canvas.Left)", 250u);
			this.mSbExpandImg.get_Children().Add(doubleAnimation);
			doubleAnimation = ToolFunction.createAnimation(default(double?), imageFillModeRect.get_Y(), this.imgAni, "(Canvas.Top)", 250u);
			this.mSbExpandImg.get_Children().Add(doubleAnimation);
			this.mSbExpandImg.Begin();
			this.mSbExpandImg.add_Completed(new EventHandler(this.mSbExpandImg_Completed));
			this.mBIsExpandImgAniStarted = true;
		}
		private void mSbExpandImg_Completed(object sender, EventArgs e)
		{
			this.stopExpandImgAni();
		}
		private void stopExpandImgAni()
		{
			if (this.mBIsFirstIn)
			{
				this.mNCurPaIndex = 0;
				this.panoramaCtrl.get_Items().Add(this.mItem1);
				this.panoramaCtrl.get_Items().Add(this.mItem2);
				this.mBIsFirstIn = false;
			}
			else
			{
				this.mNCurPaIndex = this.panoramaCtrl.SelectedIndex;
			}
			if (this.mNCurPaIndex < 0)
			{
				Log.smethod_5("ScrollPicListCtrl", "stopExpandImgAni panoramaCtrl.SelectedIndex < 0");
				this.panoramaCtrl.DefaultItem = this.mListImgItems.get_Item(0);
				this.mNCurPaIndex = 0;
			}
			this.mBIsExpandImgAniStarted = false;
			if (this.mSbExpandImg != null)
			{
				this.mSbExpandImg.Stop();
				this.mSbExpandImg = null;
			}
			this.mListImgItems.get_Item(this.mNCurPaIndex).mImgThumb = this.mScrollPicsCtrlArgs.mListThumbImg.get_Item(this.mScrollPicsCtrlArgs.mNFirstPicIndex);
			this.mListImgItems.get_Item(this.mNCurPaIndex).ObjMediaInfo = this.mScrollPicsCtrlArgs.mListSnsImg.get_Item(this.mScrollPicsCtrlArgs.mNFirstPicIndex);
			this.panoramaCtrl.set_Visibility(0);
			this.setImgToPaCtrl();
			this.imgAni.set_Visibility(1);
			this.canvasAniArea.set_Visibility(1);
		}
		private void startDownLoadImgAni()
		{
			this.mBIsDownLoadImgAniStarted = true;
		}
		private void stopDownLoadImgAni()
		{
			this.mBIsDownLoadImgAniStarted = false;
		}
		private void startShrinkImgAni()
		{
			this.mBIsFirstLoaded = true;
			if (!ScrollPicsCtrlArgs.CheckIsInfoOk(this.mScrollPicsCtrlArgs))
			{
				return;
			}
			if (this.mBIsShrinkImgAniStarted)
			{
				return;
			}
			this.canvasAniArea.set_Visibility(0);
			Panel arg_48_0 = this.gridLayoutRoot;
			ImageBrush imageBrush = new ImageBrush();
			imageBrush.set_ImageSource(this.mScrollPicsCtrlArgs.mImgBack);
			arg_48_0.set_Background(imageBrush);
			Panel arg_65_0 = this.canvasAniArea;
			SolidColorBrush solidColorBrush = new SolidColorBrush();
			solidColorBrush.set_Color(Colors.get_Transparent());
			arg_65_0.set_Background(solidColorBrush);
			this.imgAni.set_Visibility(0);
			this.panoramaCtrl.set_Visibility(1);
			Rect rect = this.mScrollPicsCtrlArgs.mListOriginPos.get_Item(this.mNCurImageIndex);
			this.imgAni.set_Source(this.mScrollPicsCtrlArgs.mListThumbImg.get_Item(this.mNCurImageIndex));
			if (this.mScrollPicsCtrlArgs.mListSnsImg.get_Count() > 1)
			{
				this.imgAni.set_Stretch(3);
			}
			else
			{
				this.imgAni.set_Stretch(1);
			}
			TloMedia tloMedia = this.mScrollPicsCtrlArgs.mListSnsImg.get_Item(this.mNCurImageIndex);
			Rect imageFillModeRect = ToolFunction.GetImageFillModeRect(new Size(460.0, 800.0), new Size((double)tloMedia.nWidth, (double)tloMedia.nHeight));
			this.mSbShrinkImg = new Storyboard();
			double y = rect.get_Y();
			DoubleAnimation doubleAnimation = ToolFunction.createAnimation(new double?(imageFillModeRect.get_Y()), y, this.imgAni, "(Canvas.Top)", 250u);
			this.mSbShrinkImg.get_Children().Add(doubleAnimation);
			doubleAnimation = ToolFunction.createAnimation(new double?(imageFillModeRect.get_X()), rect.get_X() - 12.0, this.imgAni, "(Canvas.Left)", 250u);
			this.mSbShrinkImg.get_Children().Add(doubleAnimation);
			doubleAnimation = ToolFunction.createAnimation(new double?(imageFillModeRect.get_Height()), rect.get_Height(), this.imgAni, "Height", 250u);
			this.mSbShrinkImg.get_Children().Add(doubleAnimation);
			doubleAnimation = ToolFunction.createAnimation(new double?(imageFillModeRect.get_Width()), rect.get_Width(), this.imgAni, "Width", 250u);
			this.mSbShrinkImg.get_Children().Add(doubleAnimation);
			this.mSbShrinkImg.Begin();
			this.mSbShrinkImg.add_Completed(new EventHandler(this.mSbShrinkImg_Completed));
			this.mBIsShrinkImgAniStarted = true;
		}
		private Rect getImageRect(Size Bound, Size OriginSize)
		{
			Rect result = new Rect(0.0, 0.0, 480.0, 800.0);
			if (OriginSize.get_Height() > 0.0 && OriginSize.get_Width() > 0.0 && Bound.get_Width() > 0.0 && Bound.get_Height() > 0.0)
			{
				double num = Bound.get_Height() / Bound.get_Width();
				double num2 = OriginSize.get_Height() / OriginSize.get_Width();
				if (num2 >= num)
				{
					result.set_Height(Bound.get_Height());
					result.set_Width(Bound.get_Height() / num2);
				}
				else
				{
					result.set_Height(Bound.get_Width() * num2);
					result.set_Width(Bound.get_Width());
				}
				result.set_X(Bound.get_Width() / 2.0 - result.get_Width() / 2.0);
				result.set_Y(Bound.get_Height() / 2.0 - result.get_Height() / 2.0);
				return result;
			}
			return result;
		}
		private void mSbShrinkImg_Completed(object sender, EventArgs e)
		{
			this.stopShrinkImgAni();
		}
		private void stopShrinkImgAni()
		{
			this.mBIsShrinkImgAniStarted = false;
			if (this.mSbShrinkImg != null)
			{
				this.mSbShrinkImg.Stop();
				this.mSbShrinkImg = null;
			}
			if (this.mScrollPicsCtrlArgs.mPanelHolder != null)
			{
				this.mScrollPicsCtrlArgs.mPanelHolder.get_Children().Remove(this);
				using (IEnumerator<UIElement> enumerator = this.mScrollPicsCtrlArgs.mPanelHolder.get_Children().GetEnumerator())
				{
					while (enumerator.MoveNext())
					{
						UIElement current = enumerator.get_Current();
						if (this.mDictParentVisibility.ContainsKey(current))
						{
							current.set_Visibility(this.mDictParentVisibility.get_Item(current));
						}
					}
				}
				this.mDictParentVisibility.Clear();
			}
			else
			{
				ToolFunction.GetRootPage().GoBack();
			}
			this.imgAni.set_Source(null);
			this.imgAni.set_Visibility(1);
			this.canvasAniArea.set_Visibility(1);
			if (this.mScrollPicsCtrlArgs.mDlgHide != null)
			{
				this.mScrollPicsCtrlArgs.mDlgHide(null, null);
			}
			this.img1.ObjMediaInfo = null;
			this.img1.imgContent.set_Source(null);
			this.img1.mImgThumb = null;
			this.img2.ObjMediaInfo = null;
			this.img2.imgContent.set_Source(null);
			this.img2.mImgThumb = null;
			this.img3.ObjMediaInfo = null;
			this.img3.imgContent.set_Source(null);
			this.img3.mImgThumb = null;
			this.imgAni.set_Source(null);
			this.mScrollPicsCtrlArgs.mDlgHide = null;
			this.mScrollPicsCtrlArgs.mDlgShow = null;
			this.mScrollPicsCtrlArgs.mListSnsImg = null;
			this.mScrollPicsCtrlArgs.mNFirstPicIndex = -1;
			this.mScrollPicsCtrlArgs.mListThumbImg = null;
			this.mScrollPicsCtrlArgs.mListOriginPos = null;
			this.mScrollPicsCtrlArgs.mPanelHolder = null;
			this.mScrollPicsCtrlArgs.mImgBack = null;
			this.mScrollPicsCtrlArgs = null;
			this.mBIsStarted = false;
			this.recoverAppBar();
			base.get_Dispatcher().BeginInvoke(delegate
			{
				Panel arg_18_0 = this.gridLayoutRoot;
				SolidColorBrush solidColorBrush = new SolidColorBrush();
				solidColorBrush.set_Color(Colors.get_Black());
				arg_18_0.set_Background(solidColorBrush);
			});
		}
		public void SetArgs(ScrollPicsCtrlArgs scrollPicCtrArg)
		{
			this.mScrollPicsCtrlArgs = scrollPicCtrArg;
			if (ScrollPicsCtrlArgs.CheckIsInfoOk(this.mScrollPicsCtrlArgs))
			{
				Panel arg_2F_0 = this.gridLayoutRoot;
				SolidColorBrush solidColorBrush = new SolidColorBrush();
				solidColorBrush.set_Color(Colors.get_Black());
				arg_2F_0.set_Background(solidColorBrush);
				Panel arg_4C_0 = this.canvasAniArea;
				SolidColorBrush solidColorBrush2 = new SolidColorBrush();
				solidColorBrush2.set_Color(Colors.get_Black());
				arg_4C_0.set_Background(solidColorBrush2);
				if (this.mScrollPicsCtrlArgs.mBIsNeedAnimation)
				{
					this.imgAni.set_Stretch(1);
					Rect rect = this.mScrollPicsCtrlArgs.mListOriginPos.get_Item(this.mScrollPicsCtrlArgs.mNFirstPicIndex);
					this.imgAni.SetValue(Canvas.TopProperty, rect.get_Y());
					this.imgAni.SetValue(Canvas.LeftProperty, rect.get_X() - 12.0);
					this.imgAni.set_Height(rect.get_Height());
					this.imgAni.set_Width(rect.get_Width());
					this.imgAni.set_Source(this.mScrollPicsCtrlArgs.mListThumbImg.get_Item(this.mScrollPicsCtrlArgs.mNFirstPicIndex));
					this.imgAni.set_Visibility(0);
					this.canvasAniArea.set_Visibility(0);
				}
				else
				{
					this.canvasAniArea.set_Visibility(1);
				}
				base.UpdateLayout();
			}
			this.mBIsFirstLoaded = true;
		}
		private void setAppBar()
		{
			BasePage topPage = PageManager.getInstance().GetTopPage();
			if (topPage == null)
			{
				return;
			}
			this.mPreBar = topPage.get_ApplicationBar();
			this.mBar = new ApplicationBar();
			ApplicationBarMenuItem applicationBarMenuItem = new ApplicationBarMenuItem(strings.COM_Save);
			applicationBarMenuItem.add_Click(new EventHandler(this.btnSave_Click));
			this.mBar.get_MenuItems().Add(applicationBarMenuItem);
			ApplicationBarMenuItem applicationBarMenuItem2 = new ApplicationBarMenuItem(strings.Album_Forward);
			applicationBarMenuItem2.add_Click(new EventHandler(this.btnSendToOther_Click));
			this.mBar.get_MenuItems().Add(applicationBarMenuItem2);
			topPage.set_ApplicationBar(this.mBar);
			BasePage.SetAppBarStyle(this.mBar);
		}
		private void btnSave_Click(object sender, EventArgs e)
		{
			if (ScrollPicsCtrlArgs.CheckIsInfoOk(this.mScrollPicsCtrlArgs) && this.mScrollPicsCtrlArgs.mListSnsImg.get_Count() > this.mNCurImageIndex && this.mNCurImageIndex >= 0)
			{
				this.SavaPic();
				return;
			}
		}
		private void SavaPic()
		{
			try
			{
				ImageSource arg_1B_0 = this.mListImgItems.get_Item(this.mNCurPaIndex).imgContent.get_Source();
				byte[] array = SnsMediaStorage.load(this.mScrollPicsCtrlArgs.mListSnsImg.get_Item(this.mNCurImageIndex).strUrl);
				MemoryStream memoryStream = new MemoryStream(array);
				MediaLibrary mediaLibrary = new MediaLibrary();
				mediaLibrary.SavePicture(this.GetExisPicName(), memoryStream);
				MessageBoxManager.ShowToast(strings.ImageViewSaveSuccess, 2500, null, false);
			}
			catch (Exception ex)
			{
				Log.smethod_1(base.GetType().get_Name(), "SavaPic Exception" + ex.get_StackTrace());
				MMMessageBox.Show(strings.ImageViewSaveFail, true, "确定");
			}
		}
		private string GetExisPicName()
		{
			return "MicroMsgAblum" + DateTime.get_Now().get_Ticks() + ".jpg";
		}
		private void btnSendToOther_Click(object sender, EventArgs e)
		{
			if (ScrollPicsCtrlArgs.CheckIsInfoOk(this.mScrollPicsCtrlArgs) && this.mScrollPicsCtrlArgs.mListSnsImg.get_Count() > this.mNCurImageIndex && this.mNCurImageIndex >= 0)
			{
				string strUrl = this.mScrollPicsCtrlArgs.mListSnsImg.get_Item(this.mNCurImageIndex).strUrl;
				object[] object_ = new object[]
				{
					strUrl
				};
				ToolFunction.GotoPageForUserControl("/Source/Plugin/Sns/Album/UI/ChooseAContactToSendImgPage.xaml", object_, false);
				return;
			}
		}
		private void recoverAppBar()
		{
			BasePage topPage = PageManager.getInstance().GetTopPage();
			if (topPage == null)
			{
				return;
			}
			topPage.set_ApplicationBar(this.mPreBar);
		}
		private void OnPinchStarted(object sender, PinchStartedGestureEventArgs e)
		{
			if (!this.isEnableDrag)
			{
				return;
			}
			if (sender is ScrollPicItem)
			{
				ScrollPicItem scrollPicItem = sender as ScrollPicItem;
				if (scrollPicItem != null)
				{
					BitmapImage bitmapImage = scrollPicItem.imgContent.get_Source() as BitmapImage;
					if (bitmapImage != null)
					{
						double num = Math.Max(480.0 / (double)bitmapImage.get_PixelWidth(), (double)bitmapImage.get_PixelWidth() / 480.0);
						double num2 = Math.Max(800.0 / (double)bitmapImage.get_PixelHeight(), (double)bitmapImage.get_PixelHeight() / 800.0);
						this.maxRadio = Math.Max(Math.Max(num, num2), 5.0);
					}
					else
					{
						this.maxRadio = 5.0;
					}
					this.ShowImg.set_Source(scrollPicItem.imgContent.get_Source());
					this.ImgView.set_Visibility(0);
					this.panoramaLayout.set_Visibility(1);
				}
			}
			this.initialScale = this.transform.get_ScaleX();
		}
		private CompositeTransform GetCopyTransform(CompositeTransform trans)
		{
			CompositeTransform compositeTransform = new CompositeTransform();
			compositeTransform.set_CenterX(trans.get_CenterX());
			compositeTransform.set_CenterY(trans.get_CenterY());
			compositeTransform.set_ScaleX(trans.get_ScaleX());
			compositeTransform.set_ScaleY(trans.get_ScaleY());
			compositeTransform.set_TranslateX(trans.get_TranslateX());
			compositeTransform.set_TranslateY(trans.get_TranslateY());
			return compositeTransform;
		}
		private CompositeTransform GetContraryTransform(CompositeTransform trans)
		{
			CompositeTransform compositeTransform = new CompositeTransform();
			compositeTransform.set_CenterX(0.0);
			compositeTransform.set_CenterY(0.0);
			compositeTransform.set_ScaleX(1.0 / trans.get_ScaleX());
			compositeTransform.set_ScaleY(1.0 / trans.get_ScaleY());
			compositeTransform.set_TranslateX(0.0 - trans.get_TranslateX());
			compositeTransform.set_TranslateY(0.0 - trans.get_TranslateY());
			return compositeTransform;
		}
		private void OnPinchDelta(object sender, PinchGestureEventArgs e)
		{
			if (!this.isEnableDrag)
			{
				return;
			}
			double num = e.DistanceRatio;
			if (num > 2.0)
			{
				num = 2.0;
			}
			else
			{
				if (num < 0.3)
				{
					num = 0.3;
				}
			}
			if (this.initialScale * num > 0.65 && this.initialScale * num < this.maxRadio)
			{
				Point resultPoint = new Point(e.GetPosition(this.ImgView).get_X(), e.GetPosition(this.ImgView).get_Y());
				Point pointSrc = default(Point);
				bool oldPoint = this.GetOldPoint(resultPoint, this.transform, ref pointSrc);
				CompositeTransform copyTransform = this.GetCopyTransform(this.transform);
				copyTransform.set_ScaleX(this.initialScale * num);
				copyTransform.set_ScaleY(this.initialScale * num);
				Point point = default(Point);
				bool oldPoint2 = this.GetOldPoint(resultPoint, copyTransform, ref point);
				Point point2 = default(Point);
				bool transformPoint = this.GetTransformPoint(pointSrc, copyTransform, ref point2);
				this.transform.set_ScaleX(this.initialScale * num);
				this.transform.set_ScaleY(this.initialScale * num);
				if (oldPoint && oldPoint2 && transformPoint)
				{
					CompositeTransform expr_148 = this.transform;
					expr_148.set_TranslateX(expr_148.get_TranslateX() + (resultPoint.get_X() - point2.get_X()));
					CompositeTransform expr_169 = this.transform;
					expr_169.set_TranslateY(expr_169.get_TranslateY() + (resultPoint.get_Y() - point2.get_Y()));
				}
				return;
			}
		}
		private void GestureListener_DragStarted(object sender, DragStartedGestureEventArgs e)
		{
			if (!this.isEnableDrag)
			{
				return;
			}
			this.initialX = this.transform.get_TranslateX();
			this.initialY = this.transform.get_TranslateY();
		}
		private void GestureListener_DragDelta(object sender, DragDeltaGestureEventArgs e)
		{
			if (!this.isEnableDrag)
			{
				return;
			}
			CompositeTransform expr_0F = this.transform;
			expr_0F.set_TranslateX(expr_0F.get_TranslateX() + e.HorizontalChange * 1.2);
			CompositeTransform expr_31 = this.transform;
			expr_31.set_TranslateY(expr_31.get_TranslateY() + e.VerticalChange * 1.2);
		}
		private void GestureListener_DragCompleted(object sender, DragCompletedGestureEventArgs e)
		{
			if (!this.isEnableDrag)
			{
				return;
			}
			this.AdjustImagePosition();
		}
		private void AdjustImagePosition()
		{
			double num = 0.0;
			double num2 = 0.0;
			if (!this.IsShouldReplace(ref num, ref num2))
			{
				return;
			}
			TimeSpan timeSpan = TimeSpan.FromSeconds(0.3);
			Storyboard storyboard = new Storyboard();
			double num3 = this.transform.get_TranslateX();
			double num4 = this.transform.get_TranslateX() + num;
			DoubleAnimation doubleAnimation = new DoubleAnimation();
			doubleAnimation.set_From(new double?(num3));
			doubleAnimation.set_To(new double?(num4));
			doubleAnimation.set_Duration(timeSpan);
			DoubleAnimation doubleAnimation2 = doubleAnimation;
			Storyboard.SetTarget(doubleAnimation2, this.transform);
			Storyboard.SetTargetProperty(doubleAnimation2, new PropertyPath(CompositeTransform.TranslateXProperty));
			storyboard.get_Children().Add(doubleAnimation2);
			num3 = this.transform.get_TranslateY();
			num4 = this.transform.get_TranslateY() + num2;
			DoubleAnimation doubleAnimation3 = new DoubleAnimation();
			doubleAnimation3.set_From(new double?(num3));
			doubleAnimation3.set_To(new double?(num4));
			doubleAnimation3.set_Duration(timeSpan);
			DoubleAnimation doubleAnimation4 = doubleAnimation3;
			Storyboard.SetTarget(doubleAnimation4, this.transform);
			Storyboard.SetTargetProperty(doubleAnimation4, new PropertyPath(CompositeTransform.TranslateYProperty));
			storyboard.get_Children().Add(doubleAnimation4);
			storyboard.Begin();
		}
		private void ResumeStoryBoard()
		{
			TimeSpan timeSpan = TimeSpan.FromSeconds(0.3);
			Storyboard storyboard = new Storyboard();
			double num = this.transform.get_ScaleX();
			double num2 = 1.0;
			DoubleAnimation doubleAnimation = new DoubleAnimation();
			doubleAnimation.set_From(new double?(num));
			doubleAnimation.set_To(new double?(num2));
			doubleAnimation.set_Duration(timeSpan);
			DoubleAnimation doubleAnimation2 = doubleAnimation;
			Storyboard.SetTarget(doubleAnimation2, this.transform);
			Storyboard.SetTargetProperty(doubleAnimation2, new PropertyPath(CompositeTransform.ScaleXProperty));
			storyboard.get_Children().Add(doubleAnimation2);
			num = this.transform.get_ScaleY();
			num2 = 1.0;
			DoubleAnimation doubleAnimation3 = new DoubleAnimation();
			doubleAnimation3.set_From(new double?(num));
			doubleAnimation3.set_To(new double?(num2));
			doubleAnimation3.set_Duration(timeSpan);
			DoubleAnimation doubleAnimation4 = doubleAnimation3;
			Storyboard.SetTarget(doubleAnimation4, this.transform);
			Storyboard.SetTargetProperty(doubleAnimation4, new PropertyPath(CompositeTransform.ScaleYProperty));
			storyboard.get_Children().Add(doubleAnimation4);
			num = this.transform.get_TranslateX();
			num2 = 0.0;
			DoubleAnimation doubleAnimation5 = new DoubleAnimation();
			doubleAnimation5.set_From(new double?(num));
			doubleAnimation5.set_To(new double?(num2));
			doubleAnimation5.set_Duration(timeSpan);
			DoubleAnimation doubleAnimation6 = doubleAnimation5;
			Storyboard.SetTarget(doubleAnimation6, this.transform);
			Storyboard.SetTargetProperty(doubleAnimation6, new PropertyPath(CompositeTransform.TranslateXProperty));
			storyboard.get_Children().Add(doubleAnimation6);
			num = this.transform.get_TranslateY();
			num2 = 0.0;
			DoubleAnimation doubleAnimation7 = new DoubleAnimation();
			doubleAnimation7.set_From(new double?(num));
			doubleAnimation7.set_To(new double?(num2));
			doubleAnimation7.set_Duration(timeSpan);
			DoubleAnimation doubleAnimation8 = doubleAnimation7;
			Storyboard.SetTarget(doubleAnimation8, this.transform);
			Storyboard.SetTargetProperty(doubleAnimation8, new PropertyPath(CompositeTransform.TranslateYProperty));
			storyboard.get_Children().Add(doubleAnimation8);
			num = this.transform.get_CenterX();
			num2 = 0.0;
			DoubleAnimation doubleAnimation9 = new DoubleAnimation();
			doubleAnimation9.set_From(new double?(num));
			doubleAnimation9.set_To(new double?(num2));
			doubleAnimation9.set_Duration(timeSpan);
			DoubleAnimation doubleAnimation10 = doubleAnimation9;
			Storyboard.SetTarget(doubleAnimation10, this.transform);
			Storyboard.SetTargetProperty(doubleAnimation10, new PropertyPath(CompositeTransform.CenterXProperty));
			storyboard.get_Children().Add(doubleAnimation10);
			num = this.transform.get_CenterY();
			num2 = 0.0;
			DoubleAnimation doubleAnimation11 = new DoubleAnimation();
			doubleAnimation11.set_From(new double?(num));
			doubleAnimation11.set_To(new double?(num2));
			doubleAnimation11.set_Duration(timeSpan);
			DoubleAnimation doubleAnimation12 = doubleAnimation11;
			Storyboard.SetTarget(doubleAnimation12, this.transform);
			Storyboard.SetTargetProperty(doubleAnimation12, new PropertyPath(CompositeTransform.CenterYProperty));
			storyboard.get_Children().Add(doubleAnimation12);
			storyboard.add_Completed(new EventHandler(this.ResumeStoryBoard_Completed));
			storyboard.Begin();
		}
		private void ResumeStoryBoard_Completed(object sender, EventArgs e)
		{
			this.panoramaLayout.set_Visibility(0);
			this.ImgView.set_Visibility(1);
			this.ShowImg.set_Source(null);
			this.transform = new CompositeTransform();
			this.ShowImg.set_RenderTransform(this.transform);
		}
		private Rect GetOriginRect(ref double xRadio, ref double yRadio)
		{
			Rect result = default(Rect);
			BitmapImage bitmapImage = this.ShowImg.get_Source() as BitmapImage;
			if (bitmapImage == null)
			{
				return result;
			}
			double num;
			double num2;
			double num5;
			double num6;
			if ((double)(bitmapImage.get_PixelHeight() / bitmapImage.get_PixelWidth()) > 1.6666666666666667)
			{
				num = 0.0;
				num2 = 800.0;
				double num3 = 800.0 / (double)bitmapImage.get_PixelHeight();
				double num4 = (double)bitmapImage.get_PixelWidth() * num3;
				num5 = (480.0 - num4) / 2.0;
				num6 = num5 + num4;
			}
			else
			{
				num5 = 0.0;
				num6 = 480.0;
				double num7 = 480.0 / (double)bitmapImage.get_PixelWidth();
				double num8 = (double)bitmapImage.get_PixelHeight() * num7;
				num = (800.0 - num8) / 2.0;
				num2 = 800.0 - num;
			}
			xRadio = (num6 - num5) / 480.0;
			yRadio = (num2 - num) / 800.0;
			result = new Rect(num5, num, num6 - num5, num2 - num);
			return result;
		}
		private bool IsShouldReplace(ref double detaX, ref double detaY)
		{
			Rect transformRect = this.GetTransformRect(this.transform);
			double num = 0.0;
			double num2 = 0.0;
			this.GetOriginRect(ref num, ref num2);
			if (transformRect.get_IsEmpty())
			{
				return false;
			}
			double num3;
			double num4;
			if (transformRect.get_Width() < 480.0)
			{
				num3 = (480.0 - transformRect.get_Width()) / 2.0;
				num4 = num3 + transformRect.get_Width();
			}
			else
			{
				num3 = 0.0;
				num4 = 480.0;
			}
			bool result = false;
			if (transformRect.get_Width() < 480.0)
			{
				if (transformRect.get_Left() < num3)
				{
					detaX = num3 - transformRect.get_Left();
					result = true;
				}
				else
				{
					if (transformRect.get_Right() > num4)
					{
						detaX = num4 - transformRect.get_Right();
						result = true;
					}
				}
			}
			else
			{
				if (transformRect.get_Left() > 0.0 && transformRect.get_Right() > 480.0)
				{
					detaX = 0.0 - transformRect.get_Left();
					if (detaX < 0.0)
					{
						result = true;
					}
					else
					{
						detaX = 0.0;
					}
				}
				else
				{
					if (transformRect.get_Left() < 0.0 && transformRect.get_Right() < 480.0)
					{
						detaX = 480.0 - transformRect.get_Right();
						if (detaX > 0.0)
						{
							result = true;
						}
						else
						{
							detaX = 0.0;
						}
					}
				}
			}
			double num5;
			double num6;
			if (transformRect.get_Height() < 800.0)
			{
				num5 = (800.0 - transformRect.get_Height()) / 2.0;
				num6 = num5 + transformRect.get_Height();
			}
			else
			{
				num5 = 0.0;
				num6 = 800.0;
			}
			if (transformRect.get_Height() < 800.0)
			{
				if (transformRect.get_Top() > num5)
				{
					detaY = num5 - transformRect.get_Top();
					result = true;
				}
				else
				{
					if (transformRect.get_Bottom() < num6)
					{
						detaY = num6 - transformRect.get_Bottom();
						result = true;
					}
				}
			}
			else
			{
				if (transformRect.get_Top() > 0.0 && transformRect.get_Bottom() > 800.0)
				{
					detaY = num5 - transformRect.get_Top();
					if (detaY < 0.0)
					{
						result = true;
					}
					else
					{
						detaY = 0.0;
					}
				}
				else
				{
					if (transformRect.get_Top() < 0.0 && transformRect.get_Bottom() < 800.0)
					{
						detaY = num6 - transformRect.get_Bottom();
						if (detaY >= 0.0)
						{
							result = true;
						}
						else
						{
							detaY = 0.0;
						}
					}
				}
			}
			return result;
		}
		private bool GetTransformPoint(Point pointSrc, CompositeTransform trans, ref Point resultPoint)
		{
			double num = 0.0;
			double num2 = 0.0;
			Rect originRect = this.GetOriginRect(ref num, ref num2);
			if (originRect.get_IsEmpty())
			{
				return false;
			}
			if (pointSrc.get_X() < originRect.get_Left() || pointSrc.get_X() > originRect.get_Right())
			{
				return false;
			}
			if (pointSrc.get_Y() >= originRect.get_Top() && pointSrc.get_Y() <= originRect.get_Bottom())
			{
				double num3 = (pointSrc.get_X() - originRect.get_Left()) / originRect.get_Width();
				double num4 = (pointSrc.get_Y() - originRect.get_Top()) / originRect.get_Height();
				Rect transformRect = this.GetTransformRect(trans);
				resultPoint = new Point(transformRect.get_Left() + transformRect.get_Width() * num3, transformRect.get_Top() + transformRect.get_Height() * num4);
				return true;
			}
			return false;
		}
		private bool GetOldPoint(Point resultPoint, CompositeTransform trans, ref Point pointSrc)
		{
			double num = 0.0;
			double num2 = 0.0;
			Rect originRect = this.GetOriginRect(ref num, ref num2);
			if (originRect.get_IsEmpty())
			{
				return false;
			}
			Rect transformRect = this.GetTransformRect(trans);
			if (resultPoint.get_X() < transformRect.get_Left() || resultPoint.get_X() > transformRect.get_Right())
			{
				return false;
			}
			if (resultPoint.get_Y() >= transformRect.get_Top() && resultPoint.get_Y() <= transformRect.get_Bottom())
			{
				double num3 = (resultPoint.get_X() - transformRect.get_Left()) / transformRect.get_Width();
				double num4 = (resultPoint.get_Y() - transformRect.get_Top()) / transformRect.get_Height();
				pointSrc = new Point(originRect.get_Left() + originRect.get_Width() * num3, originRect.get_Top() + originRect.get_Height() * num4);
				return true;
			}
			return false;
		}
		private Rect GetTransformRect(CompositeTransform trans)
		{
			double num = 0.0;
			double num2 = 0.0;
			Rect originRect = this.GetOriginRect(ref num, ref num2);
			if (originRect.get_IsEmpty())
			{
				return originRect;
			}
			Rect rect = new Rect(0.0, 0.0, originRect.get_Width(), originRect.get_Height());
			Rect rect2 = trans.TransformBounds(rect);
			Rect result = new Rect(originRect.get_Left() + rect2.get_Left(), originRect.get_Top() + rect2.get_Top(), rect2.get_Width(), rect2.get_Height());
			return result;
		}
		private void GestureListener_PinchCompleted(object sender, PinchGestureEventArgs e)
		{
			if (this.transform.get_ScaleX() < 1.0)
			{
				this.ResumeStoryBoard();
				return;
			}
			this.AdjustImagePosition();
		}
		private void panoramaCtrl_DoubleTap(object sender, RoutedEventArgs e)
		{
		}
		private void ImgView_DoubleTap(object sender, RoutedEventArgs e)
		{
			this.ResumeStoryBoard();
		}
		[DebuggerNonUserCode]
		public void InitializeComponent()
		{
			if (this._contentLoaded)
			{
				return;
			}
			this._contentLoaded = true;
			Application.LoadComponent(this, new Uri("/MicroMsg;component/Source/Plugin/Sns/Circle/UI/ScrollPicListCtrl.xaml", 2));
			this.gridLayoutRoot = (Grid)base.FindName("gridLayoutRoot");
			this.panoramaLayout = (Grid)base.FindName("panoramaLayout");
			this.panoramaCtrl = (Panorama)base.FindName("panoramaCtrl");
			this.pItem1 = (PanoramaItem)base.FindName("pItem1");
			this.img1 = (ScrollPicItem)base.FindName("img1");
			this.pItem2 = (PanoramaItem)base.FindName("pItem2");
			this.img2 = (ScrollPicItem)base.FindName("img2");
			this.pItem3 = (PanoramaItem)base.FindName("pItem3");
			this.img3 = (ScrollPicItem)base.FindName("img3");
			this.panelDots = (StackPanel)base.FindName("panelDots");
			this.dot0 = (Ellipse)base.FindName("dot0");
			this.dot1 = (Ellipse)base.FindName("dot1");
			this.dot2 = (Ellipse)base.FindName("dot2");
			this.dot3 = (Ellipse)base.FindName("dot3");
			this.dot4 = (Ellipse)base.FindName("dot4");
			this.dot5 = (Ellipse)base.FindName("dot5");
			this.dot6 = (Ellipse)base.FindName("dot6");
			this.dot7 = (Ellipse)base.FindName("dot7");
			this.dot8 = (Ellipse)base.FindName("dot8");
			this.canvasAniArea = (Canvas)base.FindName("canvasAniArea");
			this.imgAni = (Image)base.FindName("imgAni");
			this.ImgView = (Border)base.FindName("ImgView");
			this.ShowImg = (Image)base.FindName("ShowImg");
			this.transform = (CompositeTransform)base.FindName("transform");
			this.borderListener = (GestureListener)base.FindName("borderListener");
		}
	}
}
